package org.jetlinks.pro.messaging.rabbitmq.command;

import lombok.*;
import org.jetlinks.pro.datasource.Command;
import org.jetlinks.pro.messaging.rabbitmq.RabbitMQConsumer;
import org.springframework.boot.autoconfigure.amqp.RabbitProperties;
import reactor.core.publisher.Mono;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * @see org.jetlinks.pro.messaging.rabbitmq.impl.CreateConsumerHandler
 * @see RabbitMQConsumer
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Generated
public final class CreateConsumer implements Command<Mono<RabbitMQConsumer>> {

    private boolean autoAck;

    private boolean autoCreate;

    private boolean topic;

    @Nonnull
    private String exchangeOrQueue;

    private String consumerGroup;

    @Builder.Default
    private String routeKey = "";

    @Nullable
    private RabbitProperties properties;
}
